import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '@/views/index.vue'
import Home from '@/views/index/home.vue'
import Seek from '@/views/index/seek.vue'
import Message from '@/views/index/message.vue'
import User from '@/views/index/user.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home',
    component: Index,
    children: [
      { path: '/home', component: Home },
      { path: '/seek', component: Seek },
      { path: '/message', component: Message },
      { path: '/user', component: User }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
